package server.demo.dto;

import server.demo.entity.Seat;
import java.math.BigDecimal;

public class SeatDTO {
    private Long id;
    private Long carriageId;
    private Integer carriageNumber;
    private String trainNumber;
    private String seatNumber;
    private String seatType;
    private BigDecimal price;
    private Boolean isAvailable;
    
    public SeatDTO() {}
    
    public SeatDTO(Seat seat) {
        this.id = seat.getId();
        this.carriageId = seat.getCarriage().getId();
        this.carriageNumber = seat.getCarriage().getCarriageNumber();
        this.trainNumber = seat.getCarriage().getTrain().getTrainNumber();
        this.seatNumber = seat.getSeatNumber();
        this.seatType = seat.getSeatType().name();
        this.price = seat.getPrice();
        this.isAvailable = seat.getIsAvailable();
    }
    
    public Long getId() {
        return id;
    }
    
    public void setId(Long id) {
        this.id = id;
    }
    
    public Long getCarriageId() {
        return carriageId;
    }
    
    public void setCarriageId(Long carriageId) {
        this.carriageId = carriageId;
    }
    
    public Integer getCarriageNumber() {
        return carriageNumber;
    }
    
    public void setCarriageNumber(Integer carriageNumber) {
        this.carriageNumber = carriageNumber;
    }
    
    public String getTrainNumber() {
        return trainNumber;
    }
    
    public void setTrainNumber(String trainNumber) {
        this.trainNumber = trainNumber;
    }
    
    public String getSeatNumber() {
        return seatNumber;
    }
    
    public void setSeatNumber(String seatNumber) {
        this.seatNumber = seatNumber;
    }
    
    public String getSeatType() {
        return seatType;
    }
    
    public void setSeatType(String seatType) {
        this.seatType = seatType;
    }
    
    public BigDecimal getPrice() {
        return price;
    }
    
    public void setPrice(BigDecimal price) {
        this.price = price;
    }
    
    public Boolean getIsAvailable() {
        return isAvailable;
    }
    
    public void setIsAvailable(Boolean isAvailable) {
        this.isAvailable = isAvailable;
    }
}